import request from '@/utils/request'
import { download } from '@/utils/request'

// 新增必答题
export function addBd(data) {
  return request({
    url: '/businessCore/faMustAnswerQuestions',
    method: 'post',
    data
  })
}

// 修改必答题
export function updateBd(data) {
  return request({
    url: '/businessCore/faMustAnswerQuestions',
    method: 'put',
    data
  })
}

// 删除必答题
export function delBd(id) {
  return request({
    url: '/businessCore/faMustAnswerQuestions/' + id,
    method: 'delete'
  })
}

// 获取必答题
export function getBd(id) {
  return request({
    url: '/businessCore/faMustAnswerQuestions/' + id,
    method: 'get'
  })
}

// 导出必答题
export function exportBd(params, fileName) {
  const url = '/businessCore/faMustAnswerQuestions/export'
  download(
    url,
    params,
    fileName + `_${new Date().getTime()}.xlsx`
  )
}